Skip to content

avoid unnecessary copies with push_back() and push_front()#4451

Merged
danmar merged 1 commit into
cppcheck-opensource:mainfrom
firewave:cleanup-push
Sep 8, 2022
Merged

avoid unnecessary copies with push_back() and push_front()#4451
danmar merged 1 commit into
cppcheck-opensource:mainfrom
firewave:cleanup-push

Conversation

@firewave
Copy link
Copy Markdown
Collaborator

@firewave firewave commented Sep 7, 2022

It turns out this did not introduce any regressions. I accidentally used different sources for comparing runs.

This is the last step before trying to apply the misc-const-correctness fixes.

Performing a --enable=all --inconclusive scan on mame_regtest.

With DISABLE_VALUEFLOW=1:

Clang 14 1,901,388,751 -> 1,901,336,996
GCC 12 1,849,957,590 -> 1,849,623,077

With Valueflow enabled:

Clang 14 50,988,014,175 -> 50,979,722,552
GCC 12 54,791,127,461 -> 54,791,108,211

And scanning cli with --enable=all --inconclusive -Ilib -D __GNUC__ and DISABLE_VALUEFLOW=1

Clang 14 3,172,193,354 -> 3,170,450,670
GCC 12 3,216,157,495 -> 3,214,864,491

@danmar danmar merged commit d46ea7b into cppcheck-opensource:main Sep 8, 2022
@firewave firewave deleted the cleanup-push branch September 8, 2022 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants